﻿<?php

function b(){ print '<br/>';}
require_once('konfiguration.html');
$files=array("all"=>"diccionario ingles-espanol-portugues.txt");
$languages=array("english","spanish","portuguese");
foreach ($files as $value)
{
   $lines=file($value);
   foreach($lines as $line)
   { 
  
     preg_match_all('/([\S]+)/',$line,$matches,PREG_PATTERN_ORDER);
	 print_r ($matches);
	 $first_lang=$matches[0][0];
	 $second_lang=$matches[0][1];
	 $third_lang=$matches[0][2];
	 
	 mysql_query("INSERT INTO alltranslations2 (language_combo, word, translation, article,article_translation) VALUES (
	 'english_spanish3','$first_lang','$second_lang','$article','$article_translation')");
	 mysql_query("INSERT INTO alltranslations2 (language_combo, word, translation, article,article_translation) VALUES (
	 'portuguese_spanish','$third_lang','$second_lang','$article','$article_translation')");
	 mysql_query("INSERT INTO alltranslations2 (language_combo, word, translation, article,article_translation) VALUES (
	 'portuguese_english','$third_lang','$first_lang','$article','$article_translation')");
	 set_time_limit(10);
	 
	} 
	 
	
}


?>